<!doctype html>
<html class="fixed">
	<head>

		<!-- Basic -->
		<meta charset="UTF-8">

		<title>Responsive Tables | Okler Themes | Porto-Admin</title>
		<meta name="keywords" content="HTML5 Admin Template" />
		<meta name="description" content="Porto Admin - Responsive HTML5 Template">
		<meta name="author" content="okler.net">
        <script type="text/javascript" src="/static/js/vue.min.js"></script>
        <script type="text/javascript" src="/static/js/jquery-3.4.1.min.js"></script>

		<!-- Mobile Metas -->
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

		<!-- Web Fonts  -->
		<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">

		<!-- Vendor CSS -->
		<link rel="stylesheet" href="/static/admin/assets/vendor/bootstrap/css/bootstrap.css" />
		<link rel="stylesheet" href="/static/admin/assets/vendor/font-awesome/css/font-awesome.css" />
		<link rel="stylesheet" href="/static/admin/assets/vendor/magnific-popup/magnific-popup.css" />
		<link rel="stylesheet" href="/static/admin/assets/vendor/bootstrap-datepicker/css/datepicker3.css" />

		<!-- Theme CSS -->
		<link rel="stylesheet" href="/static/admin/assets/stylesheets/theme.css" />

		<!-- Skin CSS -->
		<link rel="stylesheet" href="/static/admin/assets/stylesheets/skins/default.css" />

		<!-- Theme Custom CSS -->
		<link rel="stylesheet" href="/static/admin/assets/stylesheets/theme-custom.css">

		<!-- Head Libs -->
		<script src="/static/admin/assets/vendor/modernizr/modernizr.js"></script>

	</head>
	<body>



		<section class="body">

			<!-- start: header -->
			<header class="header">
				<div class="logo-container">
					<a href="../" class="logo">
						<img src="/static/admin/assets/images/logo.png" height="35" alt="JSOFT Admin" />
					</a>
					<div class="visible-xs toggle-sidebar-left" data-toggle-class="sidebar-left-opened" data-target="html" data-fire-event="sidebar-left-opened">
						<i class="fa fa-bars" aria-label="Toggle sidebar"></i>
					</div>
				</div>

				<!-- start: search & user box -->
				<div class="header-right">
					<span class="separator"></span>

					<div id="userbox" class="userbox">
						<a href="#" data-toggle="dropdown">
							<figure class="profile-picture">
								<img src="/static/admin/assets/images/logged-user.jpg" alt="Joseph Doe" class="img-circle" data-lock-picture="assets/images/!logged-user.jpg" />
							</figure>
							<div class="profile-info" data-lock-name="John Doe" data-lock-email="johndoe@JSOFT.com">
								<span id="adminname" class="name">用户名</span>
								<span class="role">管理员</span>
							</div>

							<i class="fa custom-caret"></i>
						</a>

						<div class="dropdown-menu">
							<ul class="list-unstyled">
								<li class="divider"></li>
								<li>
									<a role="menuitem" tabindex="-1" href="/static/admin/adminprofile.html/"><i class="fa fa-user"></i> 我的信息</a>
								</li>

								<li>
									<a role="menuitem" tabindex="-1" href="/static/admin/login.html/"><i class="fa fa-power-off"></i> 退出</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<!-- end: search & user box -->
			</header>
			<!-- end: header -->
			<div class="inner-wrapper">
				<!-- start: sidebar -->
				<aside id="sidebar-left" class="sidebar-left">
				
					<div class="sidebar-header">

						<div class="sidebar-title">
							导航
						</div>
						<div class="sidebar-toggle hidden-xs" data-toggle-class="sidebar-left-collapsed" data-target="html" data-fire-event="sidebar-left-toggle">
							<i class="fa fa-bars" aria-label="Toggle sidebar"></i>
						</div>
					</div>

					<div class="nano">
						<div class="nano-content">
							<nav id="menu" class="nav-main" role="navigation">
								<ul class="nav nav-main">
									<li class="nav-active">
										<a href="/static/admin/index.html/">
											<i class="fa fa-home" aria-hidden="true"></i>
											<span>控制台</span>
										</a>
									</li>


									<li class="nav-parent">
										<a>
											<i class="fa fa-list-alt" aria-hidden="true"></i>
											<span>保留</span>
										</a>
										<ul class="nav nav-children">
											<li>
												<a href="备用1.html">
													 备用1
												</a>
											</li>
											<li>
												<a href="备用2.html">
													 备用2
												</a>
											</li>
											<li>
												<a href="备用3.html">
													 备用3
												</a>
											</li>
											<li>
												<a href="备用4.html">
													 备用4
												</a>
											</li>
											<li>
												<a href="备用5.html">
													 备用5
												</a>
											</li>
											<li>
												<a href="备用6.html">
													  备用6
												</a>
											</li>
										</ul>
									</li>
									<li class="nav-parent">
										<a>
											<i class="fa fa-users" aria-hidden="true"></i>
											<span>注册用户</span>
										</a>
										<ul class="nav nav-children">
											<li>
												<a href="/static/admin/adminuser.html/">
													 管理用户
												</a>
											</li>

										</ul>
									</li>
                                    <li class="nav-parent">
										<a>
											<i class="fa fa-user" aria-hidden="true"></i>
											<span>我的信息</span>
										</a>
										<ul class="nav nav-children">
											<li>
												<a href="/static/admin/adminprofile.html/">
													 我的个人信息
												</a>
											</li>

										</ul>
									</li>
                                    <li class="nav-parent">
										<a>
											<i class="fa fa-image" aria-hidden="true"></i>
											<span>手机品牌</span>
										</a>
										<ul class="nav nav-children">

											<li>
												<a href="/static/admin/brandinfo.html/">
													 手机品牌库
												</a>
											</li>
                                            <li>
												<a href="/static/admin/addbrand.html/">
													 添加手机品牌信息
												</a>
											</li>

										</ul>
									</li>
                                    <li class="nav-parent">
										<a>
											<i class="fa fa-star" aria-hidden="true"></i>
											<span>商品管理</span>
										</a>
										<ul class="nav nav-children">

											<li>
												<a href="/static/admin/shopinfo.html/">
													 商品信息
												</a>
											</li>
                                            <li>
												<a href="/static/admin/detailinfo.html/">
													 商品参数
												</a>
											</li>
										</ul>
									</li>
								</ul>
							</nav>
						</div>
					</div>
				
				</aside>
				<!-- end: sidebar -->

				<section role="main" class="content-body">
					<header class="page-header">
						<h2>比价网后台管理系统——商品管理</h2>

					</header>

					<!-- start: page -->
                    <section class="panel">
							<header class="panel-heading">
								<div class="panel-actions">
									<a href="#" class="fa fa-caret-down"></a>
								</div>
						
								<h2 class="panel-title">商品信息表</h2>
							</header>
							<div class="panel-body">
								<table class="table table-no-more table-bordered table-striped mb-none">
									<thead>
										<tr>
											<th class="text-center">商品编号</th>
											<th class="text-center">商品标题</th>
											<th class="text-center">商品价格</th>
											<th class="text-center">商品品牌</th>
                                            <th class="text-center">评论数</th>
                                            <th class="text-center">销售店铺</th>
                                            <th class="text-center">销售平台</th>
											<th class="text-center">操作</th>

										</tr>
									</thead>
									<tbody id="fillin1">
										<tr v-for="(item,index) in datas">
											<td class="text-center">{{ item.number }}</td>
											<td class="text-center">{{ item.title }}</td>
											<td class="text-center">{{ item.price }}</td>
											<td class="text-center">{{ item.brand }}</td>
                                            <td class="text-center">{{ item.comment_num}}</td>
                                            <td class="text-center">{{ item.store }}</td>
                                            <td class="text-center">{{ item.plate }}</td>
											<td class="text-center"><a href="#" @click='del_info(item.id)' v-on:click='datas.splice(index,1)'>删除</a></td>
										</tr>
									</tbody>
								</table>

                    <div class="page-bar" style="margin-left: 350px">
                        <ul>
                            <li v-if="cur>1"><a v-on:click="cur--,pageClick()">上一页</a></li>
                            <li v-if="cur==1"><a class="banclick">上一页</a></li>

                            <li v-for="index in indexs"  v-bind:class="{ 'active': cur == index}">
                                <a v-on:click="btnClick(index)">{{ index }}</a>
                            </li>
                            <li v-if="cur < all"><a v-on:click="cur++,pageClick()">下一页</a></li>
                            <li v-if="cur == all"><a class="banclick">下一页</a></li>
                            <li><a>共<i>{{all}}</i>页</a></li>
                        </ul>
                    </div>

							</div>
						</section>
					<!-- end: page -->
				</section>
			</div>


		</section>
<script>
        var now = window.location.href
        var nows = now.split("=")[1]
        if (nows == undefined || nows == ""){
            nows = 1
        }
        var allnum = 0


    var pageDatas = new Vue({
        el: '#fillin1',
        data: {
            datas:[],
        },
        methods:{
            pageData:function(){
            $.ajax({
                url: '/showInfo/',
                type: 'GET',
                dataType: 'json',
                data:{
                    pn:nows
                },
                success:function(data){
                    for(var i =0;i < data.length-1;i++){
                        pageDatas.datas.push(data[i])
                        allnum = data[data.length-1]["allnum"]
                    }
                },
                error:function(){}
            });
            },
        del_info:function(iid){
            $.ajax({
                url: '/delete_goodsInfo/',
                type: 'GET',
                dataType: 'text',
                data:{
                    id:iid,
                },
                success:function(data){
                },
                error:function(){

                }
            });
            },
        }
            })
    pageDatas.pageData()
</script>

        <script src="/static/js/isAdminLogin.js"></script>
        <script src="/static/js/jquery-3.4.1.min.js"></script>

        <link href="/static/css/pager.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/static/js/vue.min.js"></script>
        <script type="text/javascript" src="/static/js/vuepager.js"></script>



		<!-- Vendor -->
		<script src="/static/admin/assets/vendor/jquery/jquery.js"></script>
		<script src="/static/admin/assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
		<script src="/static/admin/assets/vendor/bootstrap/js/bootstrap.js"></script>
		<script src="/static/admin/assets/vendor/nanoscroller/nanoscroller.js"></script>
		<script src="/static/admin/assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
		<script src="/static/admin/assets/vendor/magnific-popup/magnific-popup.js"></script>
		<script src="/static/admin/assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
		
		<!-- Theme Base, Components and Settings -->
		<script src="/static/admin/assets/javascripts/theme.js"></script>
		
		<!-- Theme Custom -->
		<script src="/static/admin/assets/javascripts/theme.custom.js"></script>
		
		<!-- Theme Initialization Files -->
		<script src="/static/admin/assets/javascripts/theme.init.js"></script>

	</body>
</html>